#!/usr/bin/python
# encoding:utf8
# cosine 2010-05

"""test
"""

from kscomm.spider.start import Spider


def func(argv_dict):
	print argv_dict['url'],argv_dict['deep']

	
if __name__ == '__main__':
	
	#s = Spider('http://www.hao123.com/',deep=2,thread_num=5,crawl_scope=1,url_scope=1,url_type=1,crawl_tags=[],url_tags=['img','style','script','form'])
	s = Spider('http://www.hao123.com/',deep=2,thread_num=5,crawl_scope=1,url_scope=1,url_type=1,crawl_tags=[],url_tags=['a'])
	s.set_callback(func,['url','deep'])
	s.start()
	s.get_time_statistic()
